home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 342_01.zip / CHIPFN01.C < prev    next >
Text File  |  1993-04-03  |  1KB  |  38 lines

  1. /*-
  2.  *  ----------------------------------------------------------------------
  3.  *  File        :   CHIPFN01.C
  4.  *  Creator     :   Blake Miller
  5.  *  Version     :   01.00.00            February 1991
  6.  *  Language    :   Microsoft Quick C   Version 2.0
  7.  *  Purpose     :   Intel 8255 Compatible Digital IO Functions
  8.  *              :   80X86 OUT Instruction Function
  9.  *  ----------------------------------------------------------------------
  10.  */
  11.  
  12. void chp_portwt (int d_port, unsigned char d_byte);
  13.  
  14. /*- CHIP : Byte Put --------------------------**
  15.  *  Write a byte to one of the 80X86 ports.
  16.  *  Duplicates the library function outp()
  17.  */
  18. void chp_portwt (int d_port, unsigned char d_byte)
  19.     {
  20.     _asm    {
  21.         PUSH    AX
  22.         PUSH    DX
  23.  
  24.         MOV     DX, d_port
  25.         MOV     AL, d_byte
  26.         OUT     DX, AL
  27.  
  28.         POP     DX
  29.         POP     AX
  30.         }
  31.     }
  32.  
  33. /*-
  34.  *  ----------------------------------------------------------------------
  35.  *  END CHIPFN01.C Source File
  36.  *  ----------------------------------------------------------------------
  37.  */
  38.